package edu.rit.drh4818.fire.colormap;

import java.awt.Color;

import edu.rit.drh4818.volume.Colormap;


/**
 * @author Darren Headrick
 *
 */
public class BlueColormap extends Colormap
{
	public static String NAME = "Blue";
	
	public BlueColormap()
	{
		int gstep = 75, rstep = 150;
		int[] blue = new int[ 256 ], red = new int[ 256 ], green = new int[ 256 ];
		
		for( int x = 0; x < 256; x++ )
		{
			blue[x] = Math.min(x*3, 255);
		}
		
		for( int x = gstep; x < green.length; x++ )
		{
			green[ x ] = blue[ x - gstep ];
		}
		
		for( int x = rstep; x < red.length; x++ )
		{
			red[ x ] = blue[ x - rstep ]; 
		}
		
		for( int x = 1; x < colorMapping.length - 1; x++ )
		{
			colorMapping[255-x] = new Color( red[x], green[x], blue[x] ).getRGB();
		}
	}
	
	public String toString()
	{
		return NAME;
	}

}
